#ifndef ADINTERSTITIALFORM_H
#define ADINTERSTITIALFORM_H

#include <QDialog>
#include "AdViewControl.h"
#include <QPushButton>
#include <QVBoxLayout>
class AdInterstitialForm : public QDialog
{
        Q_OBJECT
public:
    AdInterstitialForm();
    AdViewControl* getControl();
    int getCloseButtonShowTime();
    void setCloseButtonShowTime(int closeButtonTime);
    void showEvent( QShowEvent * event );
    int getAutoCloseInterstitialTime();
    void setAutoCloseInterstitialTime(int closeButtonTime);

    void setCloseButton(QPushButton* button);
    QPushButton* getCloseButton();


private slots:
    void showButtonTimerTimeOut();
    void closeTimerTimeOut();

private:
    QTimer* closeTimer;
    QTimer* showButtonTimer;
    AdViewControl* control;
    int autoCloseInterstitialTime;
    QPushButton* closeButton;
    int closeButtonShowTime;
    QVBoxLayout *layout;
};

#endif // ADINTERSTITIALFORM_H
